// hash

const view = document.querySelector('#view')

const Movie = () => {
  view.innerHTML = `
    <div>电影列表</div>
  `
}
const Theater = () => {
  view.innerHTML = `
    <div>影院列表</div>
  `
}

window.addEventListener('load', Movie, false)

window.addEventListener('hashchange', () => {
  let hash = location.hash
  switch(hash) {
    case '#/movie':
      Movie()
      break;
    case '#/theater':
      Theater()
      break;
    default:
      Movie()
  }
}, false)